<?php
/**
 * @author Administrator
 * @date 2022/10/20 19:44
 * @desciption:
 */

namespace JsonApi;

use JsonApi\Middleware\BindFields;
use JsonApi\Middleware\Gateway;
use Plugins\Application AS BaseApp;

class Application extends BaseApp
{
    public static $app_name = "JsonApi";

    public static function boot($app)
    {
        parent::boot($app);
    }

    public static function buildControllerNamespace()
    {
        return [
            "namespace"     =>  __NAMESPACE__ . '\Controllers',
            "middleware"    =>  Gateway::class
        ];
    }

    /**
     * @param $router
     */
    public static function defineRoute($router)
    {
        $router->post("/json/query","Build@Query");
    }
}